package com.jchy.renderit.displayable;
 
import com.jchy.renderit.core.MultiPrimitiveObject;
import com.jchy.renderit.core.Point;

public class Cube extends MultiPrimitiveObject
{
    public Cube()
    {
        Point a=new Point(  0.5,  0.5,  0.5);
        Point b=new Point(  0.5, -0.5,  0.5);
        Point c=new Point( -0.5, -0.5,  0.5);
        Point d=new Point( -0.5,  0.5,  0.5);
        Point e=new Point(  0.5,  0.5, -0.5);
        Point f=new Point(  0.5, -0.5, -0.5);
        Point g=new Point( -0.5, -0.5, -0.5);
        Point h=new Point( -0.5,  0.5, -0.5);

        multi.addElement(new Triangle(a,b,c));
        multi.addElement(new Triangle(a,c,d));
        multi.addElement(new Triangle(a,e,h));
        multi.addElement(new Triangle(a,d,h));
        multi.addElement(new Triangle(d,g,h));
        multi.addElement(new Triangle(c,d,g));
        multi.addElement(new Triangle(c,f,g));
        multi.addElement(new Triangle(b,c,f));
        multi.addElement(new Triangle(b,e,f));
        multi.addElement(new Triangle(a,e,b));
        multi.addElement(new Triangle(e,f,g));
        multi.addElement(new Triangle(e,g,h));

    }
}

